package cz.proks.easyhelpdesk.api.model;

import java.util.Date;
import java.util.LinkedList;
import java.util.List;

import cz.proks.easyhelpdesk.api.model.base.AnIdentifiableModel;

public class Thread extends AnIdentifiableModel { 
    Long entryTicketId;
    Date created;
    List<Ticket> tickets;        
    
    public Long getEntryTicketId() {
        return entryTicketId;
    }

    public void setEntryTicketId(Long entryTicketId) {
        this.entryTicketId = entryTicketId;
    }
        
    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public List<Ticket> getTickets() {
        if (tickets == null)
            tickets = new LinkedList<Ticket>();
        
        return tickets;
    }

    public void setTickets(List<Ticket> tickets) {
        this.tickets = tickets;
    }

    @Override
    public String toString() {
        return "[id=" + getId() + ", entryTicketId=" + entryTicketId + ", created=" + created + ", tickets=" + tickets + "]";
    }               
}
